package com.sunwayworld.basemodule.common.asynctask.bean;

import com.sunwayworld.framework.data.annotation.Id;
import com.sunwayworld.framework.data.annotation.NotNull;
import com.sunwayworld.framework.data.annotation.Table;
import com.sunwayworld.framework.data.annotation.Transient;
import com.sunwayworld.framework.support.domain.Insertable;
import com.sunwayworld.framework.support.domain.AbstractInsertable;
import java.time.LocalDateTime;
import org.springframework.format.annotation.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;

/**
 * 异步任务服务线程池
 * 
 * @author zhangs@sunwayworld.com
 * @date 2023-03-02
 */
@Table("T_LIMS_ASYNCTASK_SCHEDULE")
public class LimsAsynctaskScheduleBean extends AbstractInsertable<Long> implements Insertable<Long> {

    @Transient
    private static final long serialVersionUID = -82566196618711043L;

    @Id
    private Long id;// ID
    private String executorId;// 任务执行器ID
    private String name;// 任务执行器名称
    private String serverId;// 异步任务服务节点ID
    @NotNull(defaultValue = "1")
    private String enable;// 启用
    @NotNull(defaultValue = "LoggerTaskExecuteCallback")
    private String taskExecuteCallback;// 任务执行完毕的回调service
    private Long corePoolSize;// 核心线程数
    private Long maxPoolSize;// 最大线程数
    private Long queueCapacity;// 队列大小
    private String createdById;// 制单人编码
    private String createdByName;// 制单人名称
    @JSONField(format = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;// 制单时间
    private String createdByOrgId;// 制单人单位编码
    private String createdByOrgName;// 制单人单位名称

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getExecutorId() {
        return executorId;
    }

    public void setExecutorId(String executorId) {
        this.executorId = executorId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getServerId() {
        return serverId;
    }

    public void setServerId(String serverId) {
        this.serverId = serverId;
    }

    public String getEnable() {
        return enable;
    }

    public void setEnable(String enable) {
        this.enable = enable;
    }

    public String getTaskExecuteCallback() {
        return taskExecuteCallback;
    }

    public void setTaskExecuteCallback(String taskExecuteCallback) {
        this.taskExecuteCallback = taskExecuteCallback;
    }

    public Long getCorePoolSize() {
        return corePoolSize;
    }

    public void setCorePoolSize(Long corePoolSize) {
        this.corePoolSize = corePoolSize;
    }

    public Long getMaxPoolSize() {
        return maxPoolSize;
    }

    public void setMaxPoolSize(Long maxPoolSize) {
        this.maxPoolSize = maxPoolSize;
    }

    public Long getQueueCapacity() {
        return queueCapacity;
    }

    public void setQueueCapacity(Long queueCapacity) {
        this.queueCapacity = queueCapacity;
    }

    public String getCreatedById() {
        return createdById;
    }

    public void setCreatedById(String createdById) {
        this.createdById = createdById;
    }

    public String getCreatedByName() {
        return createdByName;
    }

    public void setCreatedByName(String createdByName) {
        this.createdByName = createdByName;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public String getCreatedByOrgId() {
        return createdByOrgId;
    }

    public void setCreatedByOrgId(String createdByOrgId) {
        this.createdByOrgId = createdByOrgId;
    }

    public String getCreatedByOrgName() {
        return createdByOrgName;
    }

    public void setCreatedByOrgName(String createdByOrgName) {
        this.createdByOrgName = createdByOrgName;
    }

}
